home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Bus / C / Commander Demo / Commander Demo.rsrc / TEXT_5039_BUTTON TEXT.txt < prev    next >
Encoding:
Text File  |  1993-09-07  |  1.7 KB  |  38 lines

  1. BUTTON¬†TEXT (button; button text)
  2.                                                                                     Pg 45-11
  3.  
  4. button             Variable        Layout button variable
  5. button text      String          Text to display in the button
  6.  
  7.  
  8. BUTTON TEXT changes the text inside button to button text. 
  9.  
  10. BUTTON TEXT affects only buttons that display text: plain buttons, check boxes, and radio buttons. The new button text is used only for the currently displayed layout. The text must be set each time the layout is displayed. The button area must be large enough to accommodate the text; if it is not, the text is truncated. Do not use carriage returns in button text.
  11.  
  12. This command refers only to the local use of the layout. Modifications made are not saved with the layout. In a process, they will effect all occurrences of the layout.
  13.  
  14.  
  15. The following example is the script of a search button located in the footer area of an output layout which has been displayed using MODIFIED¬†SELECTION. This script searches a file and enables or disables a button labeled Delete, depending on the results of the search:
  16.  
  17.  SEARCH ([People]; [People]Name = vName) ` Find people to delete 
  18.     Case of
  19.        : (Records in selection ([People]) = 0)   ` No people found 
  20.           BUTTON TEXT (bDelete; "Delete") 
  21.           DISABLE BUTTON (bDelete)
  22.           `
  23.        : (Records in selection ([People]) = 1 )   ` One person found 
  24.           BUTTON TEXT (bDelete; "Delete Person") 
  25.           ENABLE BUTTON (bDelete)
  26.           `
  27.        : (Records in selection([People]), 1 )      ` Many people found 
  28.           BUTTON TEXT (bDelete; "Delete People") 
  29.           ENABLE BUTTON (bDelete) 
  30.     End case
  31.  
  32.  
  33.  
  34. See also: DISABLE¬†BUTTON, ENABLE¬†BUTTON, 
  35.               MODIFIED¬†SELECTION
  36.  
  37.  
  38.